package com.woniuxy.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniuxy.entity.Hospitalization;
import com.woniuxy.mapper.DrugPatientMapper;
import com.woniuxy.mapper.HospitalizationMapper;
import com.woniuxy.mapper.TdeMapper;
import com.woniuxy.service.OutHospitalMoneyService;
import com.woniuxy.service.SaasService;
import com.woniuxy.util.PageParam;
import com.woniuxy.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OutHospitalMoneyServiceImpl implements OutHospitalMoneyService , SaasService {
    @Autowired
    private HospitalizationMapper hospitalizationMapper;

    @Override
    public ResponseData<?> queryAll(PageParam<Hospitalization> pageParam) {
        PageHelper.startPage(pageParam.getPageNum(),pageParam.getPageSize());

        List<Hospitalization> hospitalizationList=hospitalizationMapper.queryAll(pageParam.getParam());


        PageInfo pageInfo =new PageInfo(hospitalizationList);

        return new ResponseData<>().ok(pageInfo);
    }

}
